From 9d35d99a033659d07c48b485578b0f20592744e7 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 13 Apr 2006 11:08:20 +0100 Subject: [PATCH] SVM patch to add BP exception intercept support. Signed-off-by: Tom Woller --- xen/arch/x86/hvm/svm/svm.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c index 996281664b..8c0f1b00b4 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -2588,13 +2588,18 @@ asmlinkage void svm_vmexit_handler(struct cpu_user_regs regs) */ break; -#ifdef XEN_DEBUGGER case VMEXIT_EXCEPTION_BP: +#ifdef XEN_DEBUGGER svm_debug_save_cpu_user_regs(®s); pdb_handle_exception(3, ®s, 1); svm_debug_restore_cpu_user_regs(®s); - break; +#else + if ( test_bit(_DOMF_debugging, &v->domain->domain_flags) ) + domain_pause_for_debugger(); + else + svm_inject_exception(vmcb, TRAP_int3, 0, 0); #endif + break; case VMEXIT_EXCEPTION_NM: svm_do_no_device_fault(vmcb); -- 2.30.2